<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Add 'word' to this spell-checking session</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.enchant-dict-add-to-personal.html">« enchant_dict_add_to_personal</a></li>
      <li style="float: right;"><a href="function.enchant-dict-add.html">enchant_dict_add »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.enchant.html">Enchant 函数</a></li>
    <li>Add 'word' to this spell-checking session</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.enchant-dict-add-to-session" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">enchant_dict_add_to_session</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL enchant &gt;= 0.1.0 )</p><p class="refpurpose"><span class="refname">enchant_dict_add_to_session</span> &mdash; <span class="dc-title">Add &#039;word&#039; to this spell-checking session</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.enchant-dict-add-to-session-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>enchant_dict_add_to_session</strong></span>(<span class="methodparam"><span class="type"><a href="class.enchantdictionary.html" class="type EnchantDictionary">EnchantDictionary</a></span> <code class="parameter">$dictionary</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$word</code></span>): <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   Add a word to the given dictionary. It will be added only for the
   active spell-checking session.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.enchant-dict-add-to-session-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">dictionary</code></dt>

     <dd>

      <p class="para">
       An Enchant dictionary returned by <span class="function"><a href="function.enchant-broker-request-dict.html" class="function">enchant_broker_request_dict()</a></span>
       or <span class="function"><a href="function.enchant-broker-request-pwl-dict.html" class="function">enchant_broker_request_pwl_dict()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">word</code></dt>

     <dd>

      <p class="para">
       The word to add
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.enchant-dict-add-to-session-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.enchant-dict-add-to-session-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">dictionary</code> expects an <span class="classname"><a href="class.enchantdictionary.html" class="classname">EnchantDictionary</a></span> instance now;
  previoulsy, a <a href="language.types.resource.html" class="link">资源(resource)</a> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.enchant-dict-add-to-session-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.enchant-broker-request-dict.html" class="function" rel="rdfs-seeAlso">enchant_broker_request_dict()</a> - Create a new dictionary using a tag</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>